<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh">
<head lang="en">
    <th:block th:include="include :: header('登录')" />
</head>
<body class="login-bg">
<link rel="stylesheet" href="/css/login.css">
<div class="login layui-anim layui-anim-up" style="background-color: rgba(255,255,255,0.8)">
<!--    基于标识解析的煤气化炉在线监测系统-->
    <div class="message" style="background-color: transparent;margin: 10px 0 0 0;font-size: 24px;text-align: center;color: #000;padding: 0;font-weight: 700;">基于标识解析的煤气化炉在线监测系统</div>
    <div id="darkbannerwrap"></div>

    <form method="post" class="layui-form" >
        <input name="username" placeholder="用户名"  type="text" lay-verify="required" class="layui-input" >
        <hr class="hr15" style="background: transparent">
        <input name="password" lay-verify="required" placeholder="密码"  type="password" class="layui-input">
        <hr class="hr15" style="background: transparent">
        <input value="登录" lay-submit lay-filter="login" style="width:100%;background-color: #218ad2" type="submit">
        <hr class="hr20" style="background: transparent">
    </form>
</div>
<th:block th:include="include :: footer" />
<script>
    $(function  () {
        layui.use('form', function(){
            var form = layui.form;
            //监听提交
            form.on('submit(login)', function(data){
                localStorage.clear();
                config.commPost("/sysUser/login.json",data.field,function (data) {
                    localStorage.setItem("username",data.username);
                    location.href="/";
                })
                return false;
            });
        });
    })

    if (top != window)
        top.location.href = window.location.href;
</script>

</body>
</html>
